//
//  AppConfig.m
//  insurance
//
//  Created by li on 2018/6/19.
//  Copyright © 2018年 li. All rights reserved.
//

#import "AppConfig.h"

////TODO：正式与测试开关
#define ISFORMAL 1

@implementation AppConfig

+ (BOOL)isRelease{
    return ISFORMAL;
}

+ (NSString *)versionURL{
//    return @"https://tomato.harsonserver.com/public/bbd/version";
    return [self isRelease] ?  @"http://release.app.harsonserver.com/chedao.conf" : @"http://debug.app.harsonserver.com/chedao.conf";
}

///接口域名
+ (NSString *)baseURL{
    //TODO:域名
    return [self isRelease] ?  @"https://api.harsonbdb.com" : @"http://14.23.35.20:6280";
//    @"http://14.23.35.18:3006";
}

+ (NSString *)mainWebURL{
    //todo:测试
    return @"http://tomato.harsonserver.com/app/HuaHeShiNe";
//   return  @"http://tomato.harsonserver.com/app/test-HuaHeShiNe";
    return  @"http://tomato.harsonserver.com/app/ceshi-HuaHeShiNe";
//    [self isRelease] ? @"http://tomato.harsonserver.com/app/HuaHeShiNe" : @"http://tomato.harsonserver.com/app/test-HuaHeShiNe";

    //灰度    @"http://tomato.harsonserver.com/app/gray-bdb"
    //正式    @"http://tomato.harsonserver.com/app/bdb"
    //测试  @"http://tomato.harsonserver.com/app/test-bdb"
}

+ (NSString *)imageUploadURL{
    return  [self isRelease] ? @"https://api.harsonserver.com/clerk/common/qnUploadFile.json?platform=36":
    @"http://14.23.35.20:81/service/clerk/common/qnUploadFile.json?platform=36";
}

+ (NSString *)webVersion{
    //todo: 测试
    return [NSString stringWithFormat:@"%ld",random()%1000];
    //[self isRelease] ? [[NSUserDefaults standardUserDefaults] objectForKey:@"releaseVersion"] : [[NSUserDefaults standardUserDefaults] objectForKey:@"debugVersion"];
}

+ (NSString *)wechatAPPID{
    return @"wxb4886e25dbdfd118";
}

+ (NSString *)baiduMapKey{
    return @"ueRG83wcWneXGvdcrlSb76Omj74YQmWd";
}

+ (NSString *)platform{
    return @"26";
}

+ (NSString *)jpushKey{
    return @"25759c5a258bdee3096097fa";
}

+ (NSString *)buglyAppKey{
    return @"692a65c57d";
}

@end
